<div style="padding-bottom: 10px">
  <nz-spin [nzSpinning]="querying" nzSize="small">
    <form nz-form>
      <div>
        <label for="inpQuery">月计划号：
          <input style="width:120px;" id="inpQuery" type="text" nz-input nz-dropdown nzPlaceHolder="请输入月计划号数字"
            [(ngModel)]="monthCode" [ngModelOptions]="{standalone: true}">
        </label>
        &nbsp;&nbsp;&nbsp;
        <label for="inpImport">月度施工导入：
          <nz-month-picker style="width:120px;" [(ngModel)]="monthSelected" [ngModelOptions]="{standalone: true}"
            nzPlaceHolder="请选择年月"></nz-month-picker>
        </label>
        <button nz-button nzType="primary" (click)="getMainData(pageSize, pageIndex, {monthCode: monthCode})">
          <i nz-icon nzType="search" nzTheme="outline"></i>
          <span>查询</span>
        </button>
      </div>
      <div style="margin-top:10px">
        <button nz-button nzType="primary" (click)="import()" [disabled]="!!monthSelected">
          <i nz-icon nzType="printer" nzTheme="outline"></i>
          <span>导入</span>
        </button>
        <button nz-button nzType="primary" (click)="construction(0)" #subject>
          主体施工
        </button>
        <button nz-button nzType="primary" (click)="construction(1)" #coordinate>配合施工
        </button>
      </div>
    </form>
  </nz-spin>
</div>
<nz-spin nzSize="large" [nzSpinning]="loadingData" [nzDelay]="200">
  <nz-table nzSize="small" nzBordered nzShowSizeChanger [nzData]="displayData" [nzFrontPagination]="false"
    [nzFooter]="itemsTotal&&'总共 '+ itemsTotal +' 条数据'" [nzTotal]="itemsTotal" [nzScroll]="lockHeadScroll"
    [(nzPageIndex)]="pageIndex" (nzPageIndexChange)="getMainData(pageSize, pageIndex, params)" [(nzPageSize)]="pageSize"
    (nzPageSizeChange)="getMainData(pageSize, 1, {})" [nzShowQuickJumper]="itemsTotal>50">
    <thead>
      <tr>
        <th nzAlign="center" nzWidth="5%">序号</th>
        <th nzAlign="center" nzWidth="5%">月份</th>
        <th nzAlign="center" nzWidth="5%">月计划号</th>
        <th nzAlign="center" nzWidth="5%">线别</th>
        <th nzAlign="center" nzWidth="5%">地点</th>
        <th nzAlign="center" nzWidth="5%">施工类型</th>
        <th nzAlign="center" nzWidth="8%">施工里程</th>
        <th nzAlign="center" nzWidth="7%">施工项目</th>
        <th nzAlign="center" nzWidth="6%">施工时间</th>
        <th nzAlign="center">施工内容及影响范围</th>
        <th nzAlign="center" nzWidth="5%">施工等级</th>
        <th nzAlign="center" nzWidth="6%">施工负责人</th>
        <th nzAlign="center" nzWidth="7%">主体施工单位</th>
        <th nzAlign="center" nzWidth="15%">配合单位</th>
      </tr>
    </thead>
    <tbody>
      <tr *ngFor="let data of displayData; let i = index">
        <td nzAlign="center">{{ i + 1 }}</td>
        <td nzAlign="center">{{ data?.planMonth }}</td>
        <td nzAlign="center">{{ data?.monthCode }}</td>
        <td nzAlign="center">{{ data?.lineway }}</td>
        <td>{{ data?.sgplace }}</td>
        <td>{{ data?.sgtype }}</td>
        <td>{{ data?.sgcourse }}</td>
        <td>{{ data?.sgproject }}</td>
        <td nzAlign="center">{{ data?.sgtime }}</td>
        <td [innerHTML]="this.normalizeTag(data?.sgcontent)"></td>
        <td nzAlign="center">{{ data?.sglevel }}</td>
        <td nzAlign="center">{{ data?.sgwaperson }}</td>
        <td nzAlign="center">{{ data?.sgDounit }}</td>
        <td nzAlign="center">{{ data?.phorg }}</td>
      </tr>
    </tbody>
  </nz-table>
</nz-spin>